home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / Programming / MPW Interfaces & Libraries 3.1 / PInterfaces / ToolUtils.p < prev    next >
Encoding:
Text File  |  1989-10-13  |  3.0 KB  |  117 lines  |  [TEXT/MPS ]

  1. {
  2. Created: Tuesday, August 2, 1988 at 11:16 AM
  3.     ToolUtils.p
  4.     Pascal Interface to the Macintosh Libraries
  5.  
  6.     Copyright Apple Computer, Inc.    1985-1988
  7.     All rights reserved
  8. }
  9.  
  10.  
  11. {$IFC UNDEFINED UsingIncludes}
  12. {$SETC UsingIncludes := 0}
  13. {$ENDC}
  14.  
  15. {$IFC NOT UsingIncludes}
  16.     UNIT ToolUtils;
  17.     INTERFACE
  18. {$ENDC}
  19.  
  20. {$IFC UNDEFINED UsingToolUtils}
  21. {$SETC UsingToolUtils := 1}
  22.  
  23. {$I+}
  24. {$SETC ToolUtilsIncludes := UsingIncludes}
  25. {$SETC UsingIncludes := 1}
  26. {$IFC UNDEFINED UsingQuickdraw}
  27. {$I $$Shell(PInterfaces)Quickdraw.p}
  28. {$ENDC}
  29. {$SETC UsingIncludes := ToolUtilsIncludes}
  30.  
  31. CONST
  32. sysPatListID = 0;
  33. iBeamCursor = 1;
  34. crossCursor = 2;
  35. plusCursor = 3;
  36. watchCursor = 4;
  37.  
  38.  
  39. TYPE
  40.  
  41. Int64Bit = RECORD
  42.     hiLong: LONGINT;
  43.     loLong: LONGINT;
  44.     END;
  45.  
  46.  
  47.  
  48. FUNCTION FixRatio(numer: INTEGER;denom: INTEGER): Fixed;
  49.     INLINE $A869;
  50. FUNCTION FixMul(a: Fixed;b: Fixed): Fixed;
  51.     INLINE $A868;
  52. FUNCTION FixRound(x: Fixed): INTEGER;
  53.     INLINE $A86C;
  54. FUNCTION GetString(stringID: INTEGER): StringHandle;
  55.     INLINE $A9BA;
  56. FUNCTION Munger(h: Handle;offset: LONGINT;ptr1: Ptr;len1: LONGINT;ptr2: Ptr;
  57.     len2: LONGINT): LONGINT;
  58.     INLINE $A9E0;
  59. PROCEDURE PackBits(VAR srcPtr: Ptr;VAR dstPtr: Ptr;srcBytes: INTEGER);
  60.     INLINE $A8CF;
  61. PROCEDURE UnpackBits(VAR srcPtr: Ptr;VAR dstPtr: Ptr;dstBytes: INTEGER);
  62.     INLINE $A8D0;
  63. FUNCTION BitTst(bytePtr: Ptr;bitNum: LONGINT): BOOLEAN;
  64.     INLINE $A85D;
  65. PROCEDURE BitSet(bytePtr: Ptr;bitNum: LONGINT);
  66.     INLINE $A85E;
  67. PROCEDURE BitClr(bytePtr: Ptr;bitNum: LONGINT);
  68.     INLINE $A85F;
  69. FUNCTION BitAnd(value1: LONGINT;value2: LONGINT): LONGINT;
  70.     INLINE $A858;
  71. FUNCTION BitOr(value1: LONGINT;value2: LONGINT): LONGINT;
  72.     INLINE $A85B;
  73. FUNCTION BitXor(value1: LONGINT;value2: LONGINT): LONGINT;
  74.     INLINE $A859;
  75. FUNCTION BitNot(value: LONGINT): LONGINT;
  76.     INLINE $A85A;
  77. FUNCTION BitShift(value: LONGINT;count: INTEGER): LONGINT;
  78.     INLINE $A85C;
  79. FUNCTION HiWord(x: LONGINT): INTEGER;
  80.     INLINE $A86A;
  81. FUNCTION LoWord(x: LONGINT): INTEGER;
  82.     INLINE $A86B;
  83. PROCEDURE LongMul(a: LONGINT;b: LONGINT;VAR dest: Int64Bit);
  84.     INLINE $A867;
  85. FUNCTION GetIcon(iconID: INTEGER): Handle;
  86.     INLINE $A9BB;
  87. PROCEDURE PlotIcon(theRect: Rect;theIcon: Handle);
  88.     INLINE $A94B;
  89. FUNCTION GetPattern(patID: INTEGER): PatHandle;
  90.     INLINE $A9B8;
  91. FUNCTION GetCursor(cursorID: INTEGER): CursHandle;
  92.     INLINE $A9B9;
  93. FUNCTION GetPicture(picID: INTEGER): PicHandle;
  94.     INLINE $A9BC;
  95. FUNCTION SlopeFromAngle(angle: INTEGER): Fixed;
  96.     INLINE $A8BC;
  97. FUNCTION AngleFromSlope(slope: Fixed): INTEGER;
  98.     INLINE $A8C4;
  99. PROCEDURE SetString(theString: StringHandle;strNew: Str255);
  100.     INLINE $A907;
  101. FUNCTION DeltaPoint(ptA: Point;ptB: Point): LONGINT;
  102.     INLINE $A94F;
  103. FUNCTION NewString(theString: Str255): StringHandle;
  104.     INLINE $A906;
  105. PROCEDURE ShieldCursor(shieldRect: Rect;offsetPt: Point);
  106.     INLINE $A855;
  107. PROCEDURE GetIndString(VAR theString: Str255;strListID: INTEGER;index: INTEGER);
  108. PROCEDURE ScreenRes(VAR scrnHRes: INTEGER;VAR scrnVRes: INTEGER);
  109. PROCEDURE GetIndPattern(VAR thePat: Pattern;patListID: INTEGER;index: INTEGER);
  110.  
  111. {$ENDC}    { UsingToolUtils }
  112.  
  113. {$IFC NOT UsingIncludes}
  114.     END.
  115. {$ENDC}
  116.  
  117.